<?php
/**
 * @func: 连接数据库
 * @Author: liuyi
 * @Date: 2015/3/18
 */
$dsn = 'mysql:dbname=democus;host=127.0.0.1';
$user = 'root';
$password = '123@abcD';
// $password = '123456';
try{
  $conn = new PDO($dsn, $user, $password);
  $conn->query('set names utf8');
}catch(PDOException $PDOE){       //调用时处理
	echo "data base password error!";
}


?>